<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/layui/dist/css/layui.css}">
    <link rel="stylesheet" th:href="@{/layui/dist/css/admin.css}">
    <!--<link rel="icon" href="/favicon.ico">-->
    <title>管理后台</title>
</head>
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header custom-header">
            
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item slide-sidebar" lay-unselect>
                    <a href="javascript:;" class="icon-font"><i class="ai ai-menufold"></i></a>
                </li>
            </ul>

            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;" ><span  th:text="${username}">朱小明</span></a>
                    <dl class="layui-nav-child">
						<dd><a href="javascript:;" onclick="modifyPwd()">修改密码</a></dd>
                        <dd><a href=""th:href="@{/syslogout}" >退出</a></dd>
                    </dl>
                </li>
            </ul>
        </div>

        <div class="layui-side custom-admin">
            <div class="layui-side-scroll">

                <div class="custom-logo">
                    <img th:src="@{/images/sysLogo.jpg}" alt=""/>
                    <h1>码虫后台管理</h1>
                </div>
                <ul id="Nav" class="layui-nav layui-nav-tree">
                    <th:block th:unless="${#lists.isEmpty(menus)}">
                    <li th:each="menu,iterStat : ${menus}" class="layui-nav-item" th:class="${iterStat.count == 2 ? 'layui-nav-item layui-nav-itemed' : 'layui-nav-item layui-nav-tree'}">
                        <th:block th:if="${menu.pid==0}">
                        <a href="javascript:;">
                            <i class="layui-icon">&#xe609;</i>
                            <em th:text="${menu.name}">系统设置</em>
                        </a>
                        </th:block>
                        <dl class="layui-nav-child" th:each="submemu,iterStat2 : ${menus}">
                            <th:block th:if="${submemu.pid == menu.id}">
                                <dd><a href="#" th:href="@{${submemu.url}}" th:text="${submemu.name}">系统管理员</a></dd>
                            </th:block>
                        </dl>
                    </li>
                    </th:block>
                </ul>
            </div>
        </div>

        <div class="layui-body">
             <div class="layui-tab app-container" lay-allowClose="true" lay-filter="tabs">
                <ul id="appTabs" class="layui-tab-title custom-tab"></ul>
                <div id="appTabPage" class="layui-tab-content"></div>
            </div>
        </div>

        <div class="layui-footer">
            <p>© 2018 <a href="http://www.code.com/" target="_blank">码虫互联网服务外包平台</a></p>
        </div>

        <div class="mobile-mask"></div>
    </div>
    <script th:src="@{layui/dist/layui.js}"></script>
    <script th:src="@{layui/dist/index.js}" data-main="home"></script>
    <script th:src="@{/layui/dist/layui.all.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
    <script th:inline="javascript">
        /*<![CDATA[*/
        var contextPath = [[${#request.getContextPath()}]]; //获取当前应用路径
        var adminNo = [[${session.admin.adminNo}]];
        /*]]>*/
    </script>
    <script type="text/javascript">
        function a() {
            $("#Nav li").eq(1).find("dl").eq(0).find("dd a:eq(0)").click();
        }
        $(document).ready(function () {
            window.onload =a;
        })

    function modifyPwd() {
        //页面层
        layer.open({
            type: 2,
            title: '用户修改密码',
            skin: 'layui-layer-rim', //加上边框
            area: ['750px', '400px'], //宽高
            content: contextPath + '/modifyAdminPwd'
        });

    }

    </script>
</body>
</html>